IF EXISTS
(
	SELECT TOP *
	FROM dbo.[sysobjects]
	WHERE [id]=OBJECT_ID(N'dbo.[ExampleTable.TargetId.TargetTable.Id.ForeignKey]') AND OBJECTPROPERTY(id, N'IsForeignKey')=1
)
	BEGIN
	ALTER TABLE dbo.[ExampleTable] DROP CONSTRAINT [ExampleTable.TargetId.TargetTable.Id.ForeignKey]
	END
GO